package com.air.ota.vo;

import com.air.ota.util.PkgUtil;

public class UTKCancelConfirmUplinkVO extends UTKBaseUplinkPgkVO {
	
	protected byte[] cardAppSequence;
	protected byte[] cancelSequence;
	protected byte[] result;
	protected byte[] ewalletRemain;
	protected byte[] cardTransSequence;
	protected byte[] pkgSequence;
	
	public UTKCancelConfirmUplinkVO(byte[] cardSequence){
		super();
		this.cardSequence = cardSequence;
		
		cardAppSequence = new byte[8];
		cancelSequence= new byte[2];
		result = new byte[2];
		ewalletRemain = new byte[4];
		cardTransSequence = new byte[2];
		pkgSequence = new byte[4];
		
	}
	
	public void parse(byte[] pkg){
		super.parse(pkg);
		super.decryptCmdData();
		
		System.arraycopy(cmdData, 0, cardAppSequence, 0, 8);
		System.arraycopy(cmdData, 8, cancelSequence, 0, 2);
		System.arraycopy(cmdData, 10, this.result, 0, 2);
		System.arraycopy(cmdData, 12, this.ewalletRemain, 0, 4);
		System.arraycopy(cmdData, 16, this.cardTransSequence, 0, 2);
		System.arraycopy(cmdData, 18, this.pkgSequence, 0, 4);
		
		PkgUtil.setCurrentPkgSequence(pkgSequence);
	}

	public byte[] getCardAppSequence() {
		return cardAppSequence;
	}

	public byte[] getCancelSequence() {
		return cancelSequence;
	}

	public byte[] getResult() {
		return result;
	}

	public byte[] getEwalletRemain() {
		return ewalletRemain;
	}

	public byte[] getCardTransSequence() {
		return cardTransSequence;
	}

	public byte[] getPkgSequence() {
		return pkgSequence;
	}
	
	
	
}
